package com.cmc.cloud.cmclink.doc.api.document;

import com.cmc.cloud.cmclink.doc.api.document.rep.PortDescInfoRespDTO;
import com.cmc.cloud.cmclink.doc.constant.DocApiConstants;
import com.cmes.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @author lzp
 */
@FeignClient(name = DocApiConstants.NAME)
@Tag(name = "RPC - 服务 提单打印可选港口描述")
public interface PortDescApi {

    String PREFIX = DocApiConstants.PREFIX + "/portDes";

    /**
     * 港口描述查询
     *
     * @param portCodes
     * @return
     */
    @PostMapping(PREFIX + "/query")
    @Operation(summary = "港口描述信息查询只查出有效的数据")
    CommonResult<List<PortDescInfoRespDTO>> queryPortDesc(@Valid @RequestBody List<String> portCodes);
}
